home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / PPCToolbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  16.4 KB  |  517 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        PPCToolbox.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __PPCTOOLBOX__
  18. #define __PPCTOOLBOX__
  19.  
  20.  
  21. #ifndef __APPLETALK__
  22. #include <AppleTalk.h>
  23. #endif
  24. /*    #include <Types.h>                                            */
  25. /*        #include <ConditionalMacros.h>                            */
  26. /*    #include <OSUtils.h>                                        */
  27. /*        #include <MixedMode.h>                                    */
  28. /*        #include <Memory.h>                                        */
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #if GENERATINGPOWERPC
  35. #pragma options align=mac68k
  36. #endif
  37.  
  38. #ifdef __CFM68K__
  39. #pragma lib_export on
  40. #endif
  41.  
  42. typedef unsigned char PPCServiceType;
  43.  
  44.  
  45. enum {
  46.     ppcServiceRealTime            = 1
  47. };
  48.  
  49. typedef short PPCLocationKind;
  50.  
  51.  
  52. enum {
  53.     ppcNoLocation                = 0,                            /* There is no PPCLocName */
  54.     ppcNBPLocation                = 1,                            /* Use AppleTalk NBP      */
  55.     ppcNBPTypeLocation            = 2                                /* Used for specifying a location name type during PPCOpen only */
  56. };
  57.  
  58. typedef short PPCPortKinds;
  59.  
  60.  
  61. enum {
  62.     ppcByCreatorAndType            = 1,                            /* Port type is specified as colloquial Mac creator and type */
  63.     ppcByString                    = 2                                /* Port type is in pascal string format */
  64. };
  65.  
  66. /* Values returned for request field in PPCInform call */
  67. typedef unsigned char PPCSessionOrigin;
  68.  
  69.  
  70. enum {
  71. /* Values returned for requestType field in PPCInform call */
  72.     ppcLocalOrigin                = 1,                            /* session originated from this machine */
  73.     ppcRemoteOrigin                = 2                                /* session originated from remote machine */
  74. };
  75.  
  76. typedef short PPCPortRefNum;
  77.  
  78. typedef long PPCSessRefNum;
  79.  
  80. struct PPCPortRec {
  81.     ScriptCode                        nameScript;                    /* script of name */
  82.     Str32                            name;                        /* name of port as seen in browser */
  83.     PPCPortKinds                    portKindSelector;            /* which variant */
  84.     union {
  85.         Str32                            portTypeStr;            /* pascal type string */
  86.             struct {
  87.                 OSType                            portCreator;
  88.                 OSType                            portType;
  89.             }                            port;
  90.     } u;
  91. };
  92.  
  93. typedef struct PPCPortRec PPCPortRec, *PPCPortPtr;
  94.  
  95. struct LocationNameRec {
  96.     PPCLocationKind                    locationKindSelector;        /* which variant */
  97.     union {
  98.         EntityName                        nbpEntity;                /* NBP name entity */
  99.         Str32                            nbpType;                /* just the NBP type string, for PPCOpen */
  100.     } u;
  101. };
  102.  
  103. typedef struct LocationNameRec LocationNameRec, *LocationNamePtr;
  104.  
  105. struct PortInfoRec {
  106.     unsigned char                    filler1;
  107.     Boolean                            authRequired;
  108.     PPCPortRec                        name;
  109. };
  110. typedef struct PortInfoRec PortInfoRec, *PortInfoPtr;
  111.  
  112. typedef PortInfoRec *PortInfoArrayPtr;
  113.  
  114. typedef union PPCParamBlockRec PPCParamBlockRec, *PPCParamBlockPtr;
  115.  
  116. typedef pascal void (*PPCCompProcPtr)(PPCParamBlockPtr pb);
  117.  
  118. #if GENERATINGCFM
  119. typedef UniversalProcPtr PPCCompUPP;
  120. #else
  121. typedef PPCCompProcPtr PPCCompUPP;
  122. #endif
  123.  
  124. #define PPCHeader                 \
  125.     Ptr qLink;                     \
  126.     unsigned short csCode;         \
  127.     unsigned short intUse;         \
  128.     Ptr intUsePtr;                 \
  129.                                 \
  130.     PPCCompUPP ioCompletion;        \
  131.                                 \
  132.     OSErr ioResult;             \
  133.     unsigned long    Reserved[5];
  134. struct PPCOpenPBRec {
  135.     Ptr                                qLink;
  136.     unsigned short                    csCode;
  137.     unsigned short                    intUse;
  138.     Ptr                                intUsePtr;
  139.     PPCCompUPP                        ioCompletion;
  140.     OSErr                            ioResult;
  141.     unsigned long                    Reserved[5];
  142.     PPCPortRefNum                    portRefNum;                    /* 38 <--   Port Reference */
  143.     long                            filler1;
  144.     PPCServiceType                    serviceType;                /* 44 -->    Bit field describing the requested port service */
  145.     UInt8                            resFlag;                    /* Must be set to 0 */
  146.     PPCPortPtr                        portName;                    /* 46 -->   PortName for PPC */
  147.     LocationNamePtr                    locationName;                /* 50 -->   If NBP Registration is required */
  148.     Boolean                            networkVisible;                /* 54 -->   make this network visible on network */
  149.     Boolean                            nbpRegistered;                /* 55 <--   The given location name was registered on the network */
  150. };
  151. typedef struct PPCOpenPBRec PPCOpenPBRec, *PPCOpenPBPtr;
  152.  
  153. struct PPCInformPBRec {
  154.     Ptr                                qLink;
  155.     unsigned short                    csCode;
  156.     unsigned short                    intUse;
  157.     Ptr                                intUsePtr;
  158.     PPCCompUPP                        ioCompletion;
  159.     OSErr                            ioResult;
  160.     unsigned long                    Reserved[5];
  161.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  162.     PPCSessRefNum                    sessRefNum;                    /* 40 <--   Session Reference */
  163.     PPCServiceType                    serviceType;                /* 44 <--   Status Flags for type of session, local, remote */
  164.     Boolean                            autoAccept;                    /* 45 -->   if true session will be accepted automatically */
  165.     PPCPortPtr                        portName;                    /* 46 -->   Buffer for Source PPCPortRec */
  166.     LocationNamePtr                    locationName;                /* 50 -->   Buffer for Source LocationNameRec */
  167.     StringPtr                        userName;                    /* 54 -->   Buffer for Soure user's name trying to link. */
  168.     unsigned long                    userData;                    /* 58 <--   value included in PPCStart's userData */
  169.     PPCSessionOrigin                requestType;                /* 62 <--   Local or Network */
  170.     SInt8                            filler;
  171. };
  172. typedef struct PPCInformPBRec PPCInformPBRec, *PPCInformPBPtr;
  173.  
  174. struct PPCStartPBRec {
  175.     Ptr                                qLink;
  176.     unsigned short                    csCode;
  177.     unsigned short                    intUse;
  178.     Ptr                                intUsePtr;
  179.     PPCCompUPP                        ioCompletion;
  180.     OSErr                            ioResult;
  181.     unsigned long                    Reserved[5];
  182.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  183.     PPCSessRefNum                    sessRefNum;                    /* 40 <--   Session Reference */
  184.     PPCServiceType                    serviceType;                /* 44 <--   Actual service method (realTime) */
  185.     UInt8                            resFlag;                    /* 45 -->   Must be set to 0  */
  186.     PPCPortPtr                        portName;                    /* 46 -->   Destination portName */
  187.     LocationNamePtr                    locationName;                /* 50 -->   NBP or NAS style service location name */
  188.     unsigned long                    rejectInfo;                    /* 54 <--   reason for rejecting the session request */
  189.     unsigned long                    userData;                    /* 58 -->   Copied to destination PPCInform parameter block */
  190.     unsigned long                    userRefNum;                    /* 62 -->   userRefNum (obtained during login process)  */
  191. };
  192. typedef struct PPCStartPBRec PPCStartPBRec, *PPCStartPBPtr;
  193.  
  194. struct PPCAcceptPBRec {
  195.     Ptr                                qLink;
  196.     unsigned short                    csCode;
  197.     unsigned short                    intUse;
  198.     Ptr                                intUsePtr;
  199.     PPCCompUPP                        ioCompletion;
  200.     OSErr                            ioResult;
  201.     unsigned long                    Reserved[5];
  202.     short                            filler1;
  203.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  204. };
  205. typedef struct PPCAcceptPBRec PPCAcceptPBRec, *PPCAcceptPBPtr;
  206.  
  207. struct PPCRejectPBRec {
  208.     Ptr                                qLink;
  209.     unsigned short                    csCode;
  210.     unsigned short                    intUse;
  211.     Ptr                                intUsePtr;
  212.     PPCCompUPP                        ioCompletion;
  213.     OSErr                            ioResult;
  214.     unsigned long                    Reserved[5];
  215.     short                            filler1;
  216.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  217.     short                            filler2;
  218.     long                            filler3;
  219.     long                            filler4;
  220.     unsigned long                    rejectInfo;                    /* 54 -->   reason for rejecting the session request  */
  221. };
  222. typedef struct PPCRejectPBRec PPCRejectPBRec, *PPCRejectPBPtr;
  223.  
  224. struct PPCWritePBRec {
  225.     Ptr                                qLink;
  226.     unsigned short                    csCode;
  227.     unsigned short                    intUse;
  228.     Ptr                                intUsePtr;
  229.     PPCCompUPP                        ioCompletion;
  230.     OSErr                            ioResult;
  231.     unsigned long                    Reserved[5];
  232.     short                            filler1;
  233.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  234.     Size                            bufferLength;                /* 44 -->   Length of the message buffer */
  235.     Size                            actualLength;                /* 48 <--   Actual Length Written */
  236.     Ptr                                bufferPtr;                    /* 52 -->   Pointer to message buffer */
  237.     Boolean                            more;                        /* 56 -->   if more data in this block will be written */
  238.     unsigned char                    filler2;
  239.     unsigned long                    userData;                    /* 58 -->   Message block userData Uninterpreted by PPC */
  240.     OSType                            blockCreator;                /* 62 -->   Message block creator Uninterpreted by PPC */
  241.     OSType                            blockType;                    /* 66 -->   Message block type Uninterpreted by PPC */
  242. };
  243. typedef struct PPCWritePBRec PPCWritePBRec, *PPCWritePBPtr;
  244.  
  245. struct PPCReadPBRec {
  246.     Ptr                                qLink;
  247.     unsigned short                    csCode;
  248.     unsigned short                    intUse;
  249.     Ptr                                intUsePtr;
  250.     PPCCompUPP                        ioCompletion;
  251.     OSErr                            ioResult;
  252.     unsigned long                    Reserved[5];
  253.     short                            filler1;
  254.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  255.     Size                            bufferLength;                /* 44 -->   Length of the message buffer */
  256.     Size                            actualLength;                /* 48 <--   Actual length read */
  257.     Ptr                                bufferPtr;                    /* 52 -->   Pointer to message buffer */
  258.     Boolean                            more;                        /* 56 <--   if true more data in this block to be read */
  259.     unsigned char                    filler2;
  260.     unsigned long                    userData;                    /* 58 <--   Message block userData Uninterpreted by PPC */
  261.     OSType                            blockCreator;                /* 62 <--   Message block creator Uninterpreted by PPC */
  262.     OSType                            blockType;                    /* 66 <--   Message block type Uninterpreted by PPC */
  263. };
  264. typedef struct PPCReadPBRec PPCReadPBRec, *PPCReadPBPtr;
  265.  
  266. struct PPCEndPBRec {
  267.     Ptr                                qLink;
  268.     unsigned short                    csCode;
  269.     unsigned short                    intUse;
  270.     Ptr                                intUsePtr;
  271.     PPCCompUPP                        ioCompletion;
  272.     OSErr                            ioResult;
  273.     unsigned long                    Reserved[5];
  274.     short                            filler1;
  275.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  276. };
  277. typedef struct PPCEndPBRec PPCEndPBRec, *PPCEndPBPtr;
  278.  
  279. struct PPCClosePBRec {
  280.     Ptr                                qLink;
  281.     unsigned short                    csCode;
  282.     unsigned short                    intUse;
  283.     Ptr                                intUsePtr;
  284.     PPCCompUPP                        ioCompletion;
  285.     OSErr                            ioResult;
  286.     unsigned long                    Reserved[5];
  287.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  288. };
  289. typedef struct PPCClosePBRec PPCClosePBRec, *PPCClosePBPtr;
  290.  
  291. struct IPCListPortsPBRec {
  292.     Ptr                                qLink;
  293.     unsigned short                    csCode;
  294.     unsigned short                    intUse;
  295.     Ptr                                intUsePtr;
  296.     PPCCompUPP                        ioCompletion;
  297.     OSErr                            ioResult;
  298.     unsigned long                    Reserved[5];
  299.     short                            filler1;
  300.     unsigned short                    startIndex;                    /* 40 -->   Start Index */
  301.     unsigned short                    requestCount;                /* 42 -->   Number of entries to be returned */
  302.     unsigned short                    actualCount;                /* 44 <--   Actual Number of entries to be returned */
  303.     PPCPortPtr                        portName;                    /* 46 -->   PortName Match */
  304.     LocationNamePtr                    locationName;                /* 50 -->   NBP or NAS type name to locate the Port Location */
  305.     PortInfoArrayPtr                bufferPtr;                    /* 54 -->   Pointer to a buffer requestCount*sizeof(PortInfo) bytes big */
  306. };
  307. typedef struct IPCListPortsPBRec IPCListPortsPBRec, *IPCListPortsPBPtr;
  308.  
  309. union PPCParamBlockRec {
  310.     PPCOpenPBRec                    openParam;
  311.     PPCInformPBRec                    informParam;
  312.     PPCStartPBRec                    startParam;
  313.     PPCAcceptPBRec                    acceptParam;
  314.     PPCRejectPBRec                    rejectParam;
  315.     PPCWritePBRec                    writeParam;
  316.     PPCReadPBRec                    readParam;
  317.     PPCEndPBRec                        endParam;
  318.     PPCClosePBRec                    closeParam;
  319.     IPCListPortsPBRec                listPortsParam;
  320. };
  321.  
  322. #if !GENERATINGCFM
  323. #pragma parameter __D0 PPCInit
  324. #endif
  325. extern pascal OSErr PPCInit(void)
  326.  TWOWORDINLINE(0x7000, 0xA0DD);
  327. #define PPCOpen(pb, async) ((async) ? PPCOpenAsync(pb) : PPCOpenSync(pb))
  328.  
  329. #if !GENERATINGCFM
  330. #pragma parameter __D0 PPCOpenSync(__A0)
  331. #endif
  332. extern pascal OSErr PPCOpenSync(PPCOpenPBPtr pb)
  333.  TWOWORDINLINE(0x7001, 0xA0DD);
  334.  
  335. #if !GENERATINGCFM
  336. #pragma parameter __D0 PPCOpenAsync(__A0)
  337. #endif
  338. extern pascal OSErr PPCOpenAsync(PPCOpenPBPtr pb)
  339.  TWOWORDINLINE(0x7001, 0xA4DD);
  340. #define PPCInform(pb, async) ((async) ? PPCInformAsync(pb) : PPCInformSync(pb))
  341.  
  342. #if !GENERATINGCFM
  343. #pragma parameter __D0 PPCInformSync(__A0)
  344. #endif
  345. extern pascal OSErr PPCInformSync(PPCInformPBPtr pb)
  346.  TWOWORDINLINE(0x7003, 0xA0DD);
  347.  
  348. #if !GENERATINGCFM
  349. #pragma parameter __D0 PPCInformAsync(__A0)
  350. #endif
  351. extern pascal OSErr PPCInformAsync(PPCInformPBPtr pb)
  352.  TWOWORDINLINE(0x7003, 0xA4DD);
  353. #define PPCStart(pb, async) ((async) ? PPCStartAsync(pb) : PPCStartSync(pb))
  354.  
  355. #if !GENERATINGCFM
  356. #pragma parameter __D0 PPCStartSync(__A0)
  357. #endif
  358. extern pascal OSErr PPCStartSync(PPCStartPBPtr pb)
  359.  TWOWORDINLINE(0x7002, 0xA0DD);
  360.  
  361. #if !GENERATINGCFM
  362. #pragma parameter __D0 PPCStartAsync(__A0)
  363. #endif
  364. extern pascal OSErr PPCStartAsync(PPCStartPBPtr pb)
  365.  TWOWORDINLINE(0x7002, 0xA4DD);
  366. #define PPCAccept(pb, async) ((async) ? PPCAcceptAsync(pb) : PPCAcceptSync(pb))
  367.  
  368. #if !GENERATINGCFM
  369. #pragma parameter __D0 PPCAcceptSync(__A0)
  370. #endif
  371. extern pascal OSErr PPCAcceptSync(PPCAcceptPBPtr pb)
  372.  TWOWORDINLINE(0x7004, 0xA0DD);
  373.  
  374. #if !GENERATINGCFM
  375. #pragma parameter __D0 PPCAcceptAsync(__A0)
  376. #endif
  377. extern pascal OSErr PPCAcceptAsync(PPCAcceptPBPtr pb)
  378.  TWOWORDINLINE(0x7004, 0xA4DD);
  379. #define PPCReject(pb, async) ((async) ? PPCRejectAsync(pb) : PPCRejectSync(pb))
  380.  
  381. #if !GENERATINGCFM
  382. #pragma parameter __D0 PPCRejectSync(__A0)
  383. #endif
  384. extern pascal OSErr PPCRejectSync(PPCRejectPBPtr pb)
  385.  TWOWORDINLINE(0x7005, 0xA0DD);
  386.  
  387. #if !GENERATINGCFM
  388. #pragma parameter __D0 PPCRejectAsync(__A0)
  389. #endif
  390. extern pascal OSErr PPCRejectAsync(PPCRejectPBPtr pb)
  391.  TWOWORDINLINE(0x7005, 0xA4DD);
  392. #define PPCWrite(pb, async) ((async) ? PPCWriteAsync(pb) : PPCWriteSync(pb))
  393.  
  394. #if !GENERATINGCFM
  395. #pragma parameter __D0 PPCWriteSync(__A0)
  396. #endif
  397. extern pascal OSErr PPCWriteSync(PPCWritePBPtr pb)
  398.  TWOWORDINLINE(0x7006, 0xA0DD);
  399.  
  400. #if !GENERATINGCFM
  401. #pragma parameter __D0 PPCWriteAsync(__A0)
  402. #endif
  403. extern pascal OSErr PPCWriteAsync(PPCWritePBPtr pb)
  404.  TWOWORDINLINE(0x7006, 0xA4DD);
  405. #define PPCRead(pb, async) ((async) ? PPCReadAsync(pb) : PPCReadSync(pb))
  406.  
  407. #if !GENERATINGCFM
  408. #pragma parameter __D0 PPCReadSync(__A0)
  409. #endif
  410. extern pascal OSErr PPCReadSync(PPCReadPBPtr pb)
  411.  TWOWORDINLINE(0x7007, 0xA0DD);
  412.  
  413. #if !GENERATINGCFM
  414. #pragma parameter __D0 PPCReadAsync(__A0)
  415. #endif
  416. extern pascal OSErr PPCReadAsync(PPCReadPBPtr pb)
  417.  TWOWORDINLINE(0x7007, 0xA4DD);
  418. #define PPCEnd(pb, async) ((async) ? PPCEndAsync(pb) : PPCEndSync(pb))
  419.  
  420. #if !GENERATINGCFM
  421. #pragma parameter __D0 PPCEndSync(__A0)
  422. #endif
  423. extern pascal OSErr PPCEndSync(PPCEndPBPtr pb)
  424.  TWOWORDINLINE(0x7008, 0xA0DD);
  425.  
  426. #if !GENERATINGCFM
  427. #pragma parameter __D0 PPCEndAsync(__A0)
  428. #endif
  429. extern pascal OSErr PPCEndAsync(PPCEndPBPtr pb)
  430.  TWOWORDINLINE(0x7008, 0xA4DD);
  431. #define PPCClose(pb, async) ((async) ? PPCCloseAsync(pb) : PPCCloseSync(pb))
  432.  
  433. #if !GENERATINGCFM
  434. #pragma parameter __D0 PPCCloseSync(__A0)
  435. #endif
  436. extern pascal OSErr PPCCloseSync(PPCClosePBPtr pb)
  437.  TWOWORDINLINE(0x7009, 0xA0DD);
  438.  
  439. #if !GENERATINGCFM
  440. #pragma parameter __D0 PPCCloseAsync(__A0)
  441. #endif
  442. extern pascal OSErr PPCCloseAsync(PPCClosePBPtr pb)
  443.  TWOWORDINLINE(0x7009, 0xA4DD);
  444. #define IPCListPorts(pb, async) ((async) ? IPCListPortsAsync(pb) : IPCListPortsSync(pb))
  445.  
  446. #if !GENERATINGCFM
  447. #pragma parameter __D0 IPCListPortsSync(__A0)
  448. #endif
  449. extern pascal OSErr IPCListPortsSync(IPCListPortsPBPtr pb)
  450.  TWOWORDINLINE(0x700A, 0xA0DD);
  451.  
  452. #if !GENERATINGCFM
  453. #pragma parameter __D0 IPCListPortsAsync(__A0)
  454. #endif
  455. extern pascal OSErr IPCListPortsAsync(IPCListPortsPBPtr pb)
  456.  TWOWORDINLINE(0x700A, 0xA4DD);
  457. extern pascal OSErr DeleteUserIdentity(unsigned long userRef);
  458. extern pascal OSErr GetDefaultUser(unsigned long *userRef, Str32 userName);
  459. extern pascal OSErr StartSecureSession(PPCStartPBPtr pb, Str32 userName, Boolean useDefault, Boolean allowGuest, Boolean *guestSelected, ConstStr255Param prompt);
  460. typedef pascal Boolean (*PPCFilterProcPtr)(LocationNamePtr name, PortInfoPtr port);
  461.  
  462. #if GENERATINGCFM
  463. typedef UniversalProcPtr PPCFilterUPP;
  464. #else
  465. typedef PPCFilterProcPtr PPCFilterUPP;
  466. #endif
  467.  
  468. enum {
  469.     uppPPCCompProcInfo = kPascalStackBased
  470.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(PPCParamBlockPtr))),
  471.     uppPPCFilterProcInfo = kPascalStackBased
  472.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  473.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(LocationNamePtr)))
  474.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(PortInfoPtr)))
  475. };
  476.  
  477. #if GENERATINGCFM
  478. #define NewPPCCompProc(userRoutine)        \
  479.         (PPCCompUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture())
  480. #define NewPPCFilterProc(userRoutine)        \
  481.         (PPCFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture())
  482. #else
  483. #define NewPPCCompProc(userRoutine)        \
  484.         ((PPCCompUPP) (userRoutine))
  485. #define NewPPCFilterProc(userRoutine)        \
  486.         ((PPCFilterUPP) (userRoutine))
  487. #endif
  488.  
  489. #if GENERATINGCFM
  490. #define CallPPCCompProc(userRoutine, pb)        \
  491.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPPCCompProcInfo, (pb))
  492. #define CallPPCFilterProc(userRoutine, name, port)        \
  493.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPPCFilterProcInfo, (name), (port))
  494. #else
  495. #define CallPPCCompProc(userRoutine, pb)        \
  496.         (*(userRoutine))((pb))
  497. #define CallPPCFilterProc(userRoutine, name, port)        \
  498.         (*(userRoutine))((name), (port))
  499. #endif
  500.  
  501. extern pascal OSErr PPCBrowser(ConstStr255Param prompt, ConstStr255Param applListLabel, Boolean defaultSpecified, LocationNameRec *theLocation, PortInfoRec *thePortInfo, PPCFilterUPP portFilter, ConstStr32Param theLocNBPType)
  502.  THREEWORDINLINE(0x303C, 0x0D00, 0xA82B);
  503.  
  504. #ifdef __CFM68K__
  505. #pragma lib_export off
  506. #endif
  507.  
  508. #if GENERATINGPOWERPC
  509. #pragma options align=reset
  510. #endif
  511.  
  512. #ifdef __cplusplus
  513. }
  514. #endif
  515.  
  516. #endif /* __PPCTOOLBOX__ */
  517.